<?php /* Smarty version 2.6.26, created on 2018-07-25 23:42:00
         compiled from D:%5Citemstudy%5Citem/member%5Ctemplates/goods_order/index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'import', 'D:\\itemstudy\\item/member\\templates/goods_order/index.html', 1, false),array('function', 'uqcms', 'D:\\itemstudy\\item/member\\templates/goods_order/index.html', 29, false),array('modifier', 'img_size', 'D:\\itemstudy\\item/member\\templates/goods_order/index.html', 47, false),)), $this); ?>
<?php echo $this->_plugins['function']['import'][0][0]->import(array('file' => "index/header_shop.html",'title' => "订单列表"), $this);?>
 
<link rel="stylesheet" type="text/css" href="<?php echo $this->_tpl_vars['__APP__']; ?>
public/css/order.css">
<div class="tab_name"><span>订单列表</span></div>
<style type="text/css">
table thead tr th{ border-top:1px solid #efefef; border-bottom:1px solid #f2f2f2; padding:3px 0; }
.remark{ margin:12px 10px 0; float:right; }

</style>
<div class="filter">
	<a href="?m=goods_order" <?php if ($_GET['status'] == ''): ?>class="ch"<?php endif; ?>>全部订单</a>
	<a href="?m=goods_order&status=1" <?php if ($_GET['status'] == '1'): ?>class="ch"<?php endif; ?>>未支付订单</a>
	<a href="?m=goods_order&status=2" <?php if ($_GET['status'] == '2'): ?>class="ch"<?php endif; ?>>等待发货</a>
	<a href="?m=goods_order&status=3" <?php if ($_GET['status'] == '3'): ?>class="ch"<?php endif; ?>>等待收货</a>
	<a href="?m=goods_order&status=4" <?php if ($_GET['status'] == '4'): ?>class="ch"<?php endif; ?>>交易完成</a> 
</div> 
<div class="lbox">
<table width="100%">
	<thead>
		<tr>
			<th>商品名</th>
			<th width="80">单价</th>
			<th width="80">数量</th>
			<th width="100">实付款</th>
			<th width="100">状态</th>
			<th width="100">操作</th> 
		</tr> 
	</thead>
	<tbody><tr><td colspan="6" style="height:0px; padding:5px 0;"></td></tr></tbody>
	<?php echo $this->_plugins['function']['uqcms'][0][0]->load_module(array('m' => 'order','v' => 'data','c' => "order_list:user_type=2&order_id=smarty.get.order_id&page=smarty.get.page&page_size=20&status=smarty.get.status"), $this);?>

	<?php if ($this->_tpl_vars['data']['list']): ?> 
		<?php $_from = $this->_tpl_vars['data']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
			<tbody style=" border:1px solid #efefef;">  
				<tr class="order_tr_top">
					<td colspan="6" style="background:#f8f8f8; text-align:left; padding:2px 0;"> 
						<span class="order_span" style="padding-right:20px; padding-left:20px;"> 订单号：<?php echo $this->_tpl_vars['i']['order_no']; ?>
</span> 
						<span class="order_span" style="padding-right:0px;">下单时间：<?php echo $this->_tpl_vars['i']['addtime']; ?>
</span>
						<?php if ($this->_tpl_vars['i']['order_status'] == '0' || $this->_tpl_vars['i']['order_status'] == '4' || $this->_tpl_vars['i']['order_status'] == '5'): ?> 
							<a href="?m=goods_order&a=del_order&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
" class="order_del" onclick="del()">删除</a>
						<?php endif; ?>
						<a href="javascript:;" class="remark" onclick="sp_dg('备注','?m=goods_order&a=remark&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
')">备注</a>
					</td>
				</tr>
			<?php $_from = $this->_tpl_vars['i']['glist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['g']):
?>
				<tr class="order_tr">
					<td> 
						<div class="gcon">
							<div class="img"><a href="index.php?m=goods&a=detail&id=<?php echo $this->_tpl_vars['g']['gid']; ?>
" class="order_img" target="_blank"><img src="<?php echo $this->_tpl_vars['__IMG__']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['g']['images'])) ? $this->_run_mod_handler('img_size', true, $_tmp, '80x80') : $this->_plugins['modifier']['img_size'][0][0]->img_size($_tmp, '80x80')); ?>
"></a></div>
							<div class="desc">
								<div class="ttl">
									<a href="index.php?m=goods&a=detail&id=<?php echo $this->_tpl_vars['g']['gid']; ?>
" class="order_title" target="_blank"><?php echo $this->_tpl_vars['g']['title']; ?>
</a>
								</div>
								<div class="sku">
									<?php if ($this->_tpl_vars['g']['sku']): ?>
										<?php $_from = $this->_tpl_vars['g']['sku']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['s']):
?>		
											<span><?php echo $this->_tpl_vars['s']['0']; ?>
：<?php echo $this->_tpl_vars['s']['1']; ?>
 &nbsp;&nbsp; </span> 
										<?php endforeach; endif; unset($_from); ?>
									<?php endif; ?>
								</div>
							</div> 
						</div>	
					</td> 
					<td><div class="buy_pr"><span><?php echo $this->_tpl_vars['g']['price']; ?>
</span></div></td>
					<td style="border-right:1px solid #efefef;"><?php echo $this->_tpl_vars['g']['buy_num']; ?>
</td>
				<?php if ($this->_tpl_vars['k'] == '0'): ?> 
					<td style="border-right:1px solid #efefef;" rowspan="<?php echo $this->_tpl_vars['i']['span']; ?>
"> 
						<p><?php echo $this->_tpl_vars['i']['total_price']; ?>
</p>
						<?php if ($this->_tpl_vars['i']['freight_price'] > '0.00'): ?>
							<p style="font-size:12px; color:#999999;">(含运费 <?php echo $this->_tpl_vars['i']['freight_price']; ?>
)</p>
						<?php endif; ?> 
						<?php if ($this->_tpl_vars['i']['promote_price'] > '0'): ?>
							<p style="font-size:12px; color:#999999;">优惠 <?php echo $this->_tpl_vars['i']['promote_price']; ?>
</p>
						<?php endif; ?>
					</td>
					<td rowspan="<?php echo $this->_tpl_vars['i']['span']; ?>
" valign="top" style="border-right:1px solid #efefef;">
						<div class="order_status">
							<span><?php echo $this->_tpl_vars['i']['order_status_cn']; ?>
</span>
							<a href="?m=goods_order&a=detail&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
">订单详情</a>
						</div> 
					</td>
					<td rowspan="<?php echo $this->_tpl_vars['i']['span']; ?>
" valign="top">
						<p style="padding:5px 0 0 0; text-align:center;">
						<?php if ($this->_tpl_vars['i']['order_status'] == '1'): ?>
							 <a href="javascript:;">未支付</a>
						<?php elseif ($this->_tpl_vars['i']['order_status'] == '2'): ?>
							 <a href="?m=goods_order&a=detail&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
" class="button_red">发货</a> 
						<?php elseif ($this->_tpl_vars['i']['order_status'] == '3'): ?>
							<a href="?m=goods_order&a=detail&oid=<?php echo $this->_tpl_vars['i']['order_no']; ?>
">等待收货</a><br>
						<?php elseif ($this->_tpl_vars['i']['order_status'] == '4' || $this->_tpl_vars['i']['order_status'] == '5'): ?>
							<a href="javascrip:;">交易成功</a> 
						<?php elseif ($this->_tpl_vars['i']['order_status'] == '8'): ?>
							<a href="javascrip:;">拼团中</a> 
						<?php else: ?>
							 <a href="javascrip:;">交易关闭</a>
						<?php endif; ?>
					</p>
					</td> 
				<?php endif; ?>
				</tr> 
			<?php endforeach; endif; unset($_from); ?> 
			</tbody>
		<?php endforeach; endif; unset($_from); ?>
	<tfoot>
		<tr><td colspan="6"><div class="page"><?php echo $this->_tpl_vars['data']['page']; ?>
</div></td></tr>
	</tfoot>
	<?php else: ?>
		<tbody><tr><td colspan="6" class="btm"><div class="nomsg"><i></i><span>您还没有订单~</span></div></td></tr></tbody>
	<?php endif; ?>
</table>  
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
<script type="text/javascript"> 
function sp_dg(name,url){
	ajax_dialog(name,url,380); 
} 
</script>